1. Field of the Invention
The present invention relates to a virtual machine system and particularly relates to a method in which a virtual machine monitor controls scheduling of virtual processors.
2. Description of the Related Art
Power consumption has increased as processor performance has increased with the advance of processor multiplexing and increase in cache capacity. For this reason, processor power control techniques have advanced with the advance of the aforementioned techniques. A recent processor has a normal operating state and a halt state and has a processor power control function for switching one of the two states to the other state. When the processor is in the halt state, the processor suspends execution and resources of the processor are released to reduce power consumption of the processor. A general purpose operating system uses the processor power control function to halt the processor to thereby save power consumption when there is no program executed on the processor.
In a virtual machine system having a larger number of virtual processors than the number of physical processors, processor-share efficiency is very important. A method in a virtual machine system in which a virtual machine monitor detects a request to halt a virtual processor, blocks the virtual processor and gives physical processor resources to another virtual processor has been described in “How virtualization makes power management different”, [online]<URL : http://ols.108.redhat.com/2007/Reprints/ke-Reprint.pdf>, issued by Intel Corp. and JP-A-2008-186210.
The blocking method is however large in processing time cost. The processing time cost of the context switch of the blocking method affects latency of halt exit of the virtual processor. The value of the latency causes a performance issue for some work loads.
A method for reducing the processing time cost of the blocking method has been described in JP-A-Hei-06-044087. A method for deferring execution of blocking based on processor utilization ratio in the blocking method has been described in JP-A-2009-009275.
In the background-art virtual machine system according to “How virtualization makes power management different”, [online], issued by Intel Corp., the virtual machine monitor blocks the virtual processor until the virtual processor exits from the virtual halt state when the virtual machine monitor detects a request to halt the virtual processor. In the blocking method, latency of virtual halt exit of the virtual processor is so large that the value of the latency causes a performance issue when the virtual processor is halted frequently.
In the background-art method according to JP-A-Hei-06-044087, there has been proposed a method in which if there is no other process waiting for the processor when a certain process yields a processor, context switching is skipped and an idle process is executed with context of the certain process. However in this method, context saving of the virtual processor is only deferred. Accordingly, this method cannot be applied to a virtual machine system in which a large number of virtual processors operate, because there is a high possibility of failure of skipping context switching and the physical processor utilization ratio may became low. Moreover, because context switching is skipped but process scheduling is not skipped, the cost which can be reduced is partial.
In the background-art method according to JP-A-2009-009275, there has been proposed a method in which if the processor utilization ratio of the process is larger than a predetermined threshold in the case where an idle processor remains after the processor is yielded when the process executes a blocking method, execution of the blocking method is deferred to make the process remain on the processor to thereby avoid the blocking method. However for quite a few work loads the processor is halted frequently but the virtual processor utilization ratio may be low. In this case, it is uncertain from the processor utilization ratio that it is necessary to reduce the processing time required for switching the virtual processor from a virtual halt state to a virtual normal operating state.
On the other hand, in the background-art method according to “How virtualization makes power management different”, [online], issued by Intel Corp. and JP-A-2008-186210, while a virtual processor is blocked, a physical processor is allocated to another virtual processor to thereby achieve a high physical processor utilization ratio. Moreover, when an idle physical processor remains after a virtual processor is blocked, the physical processor is halted to reduce power consumption until the virtual processor to be scheduled is found. The high physical processor utilization ratio and the reduction of power consumption are very important in a virtual machine system which has, as a main object, server integration for integrating a plurality of computers into one physical computer.